#ifndef __SKILL_VIEW_H__
#define __SKILL_VIEW_H__

#include "babyfish/event.h"
#include "gofgame/common/Ref.h"
#include "gofgame/common/ui/Container.h"
#include "gofgame/common/ui/Image.h"
#include "gofgame/common/ui/Label.h"
#include "gofgame/common/ui/Button.h"
#include "gofgame/common/ui/DialogClosedEventArgs.h" 
#include "gofgame/common/resource/HornedTextureBrushResource.h"
#include "gofgame/dungeonkeeper/game/Skill.h"
#include "gofgame/dungeonkeeper/game/skill/SkillManager.h"
#include "gofgame/dungeonkeeper/ui/SkillUpgradeEventArgs.h"

using namespace gofgame::dungeonkeeper::game::skill;

namespace gofgame {
	namespace dungeonkeeper {
		namespace ui {

			using namespace babyfish;
			using namespace gofgame::common;
			using namespace gofgame::common::ui;
			using namespace gofgame::common::resource;
			using namespace gofgame::dungeonkeeper::game::skill;

			class SkillElementView : public Container {
			public:
				SkillElementView();
				virtual bool init() _override;

				virtual SkillElementViewInfo getSkillElementViewInfo() const;
				virtual void setSkillElementViewInfo(const SkillElementViewInfo &sevi);

			protected:
				void upgradeButton_click(void *sender, ComponentEventArgs &e);
				void upgradeConfirmDialog_close(void* sender, DialogClosedEventArgs &e);

			protected:
				Ref<Image> image;
				Ref<Label> descriptionLabel;
				Ref<Label> levelLabel;
				Ref<Label> menaLabel;
				Ref<Label> coolDownLabel;
				Ref<Button> upgradeButton;
				int id;
				int unlock;//1 true ; 0 false;
				static HornedTextureBrushResource elementBrushResource;
			};
		}
	}
}

#endif //__SKILL_VIEW_H__
